package com.liuyucheng.designpattern.观察者模式;

import java.math.BigDecimal;

public class ObserverPatternDemo {
    public static void main(String[] args) throws InterruptedException {
        Subject subject = new Subject();

        Ob1 ob1 = new Ob1(subject);
        Ob2 ob2 = new Ob2(subject);

        subject.setCash(new BigDecimal(1000));

        Thread.sleep(3000);

        subject.setCash(new BigDecimal(9999));
    }
}